<html>
	<head>
		<meta charset="utf-8"></meta>
		<title>BLineEdit</title>
		<link href="./style.css" rel="stylesheet" type="text/css"/>
	</head>
	<body>
		<div class="class" name="BLineEdit">
			<h1>BLineEdit</h1>
			<p>继承自<a href="BWidget.html">BWidget</a></p>
			<p id="resume">BLineEdit是单行文本编辑框，所以按下回车键时会结束编辑。<a href="#desc">详细</a></p>
			<h2>public</h2>
			<table id="public">
				<tr><td align="right"/><td><a href="#BLineEdit(BWidget*)">BLineEdit</a>(BWidget* parent = 0);</td></tr>
				<tr><td align="right"/><td><a href="#BLineEdit(const BString&,BWidget*)">BLineEdit</a>(const BString& text, BWidget* parent = 0);</td></tr>
				<tr><td align="right"/><td><a href="#~BLineEdit()">~BLineEdit</a>();</td></tr>
				<tr><td align="right">bool </td><td><a href="#setAlign(Align)">setAlign</a>(Align align);</td></tr>
				<tr><td align="right">Align </td><td><a href="#align()">align</a>() const;</td></tr>
				<tr><td align="right">bool </td><td><a href="#setText(const BString&)">setText</a>(const BString& text);</td></tr>
				<tr><td align="right">const BString&amp; </td><td><a href="#text()">text</a>() const;</td></tr>
				<tr><td align="right">bool </td><td><a href="#setTextFormat(BTextFormat*)">setTextFormat</a>(BTextFormat* textFormat);</td></tr>
				<tr><td align="right">const BTextFormat* </td><td><a href="#textFormat()">textFormat</a>() const;</td></tr>
				<tr><td align="right">BTextFormat* </td><td><a href="#textFormat()">textFormat</a>();</td></tr>
				<tr><td align="right">bool </td><td><a href="#setReadOnly(bool)">setReadOnly</a>(bool readOnly);</td></tr>
				<tr><td align="right">bool </td><td><a href="#readOnly()">readOnly</a>() const;</td></tr>
				<tr><td align="right">bool </td><td><a href="#setPrefix(const BString&)">setPrefix</a>(const BString& prefix);</td></tr>
				<tr><td align="right">const BString&amp; </td><td><a href="#prefix()">prefix</a>() const;</td></tr>
				<tr><td align="right">bool </td><td><a href="#setPrefixAlign(Align)">setPrefixAlign</a>(Align prefixAlign);</td></tr>
				<tr><td align="right">Align </td><td><a href="#prefixAlign()">prefixAlign</a>() const;</td></tr>
				<tr><td align="right">bool </td><td><a href="#setSuffix(const BString&)">setSuffix</a>(const BString& suffix);</td></tr>
				<tr><td align="right">const BString&amp; </td><td><a href="#suffix()">suffix</a>() const;</td></tr>
				<tr><td align="right">bool </td><td><a href="#setSuffixAlign(Align)">setSuffixAlign</a>(Align suffixAlign);</td></tr>
				<tr><td align="right">Align </td><td><a href="#suffixAlign()">suffixAlign</a>() const;</td></tr>
				<tr><td align="right">using </td><td><a href="#BWidget::query;()">BWidget::query;</a></td></tr>
				<tr><td align="right">virtual bool </td><td><a href="#query(const BString&, BValue&)">query</a>(const BString& text, BValue& value) const;</td></tr>
				<tr><td align="right">virtual BSize </td><td><a href="#sizeHint()">sizeHint</a>() const;</td></tr>
			</table>
			<h2>protected</h2>
			<table id="protected">
				<tr><td align="right">virtual void </td><td><a href="#updateEvent(const BEvent&)">updateEvent</a>(const BEvent& event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#resizeEvent(const BEvent&)">resizeEvent</a>(const BEvent& event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#styleEvent(const BEvent&)">styleEvent</a>(const BEvent& event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#freshEvent(const BEvent&)">freshEvent</a>(const BEvent& event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#paintEvent(const BEvent&)">paintEvent</a>(const BEvent& event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#focusEvent(const BEvent&)">focusEvent</a>(const BEvent& event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#inputEvent(const BEvent&)">inputEvent</a>(const BEvent& event);</td></tr>
				<tr><td align="right">virtual bool </td><td><a href="#keyPressEvent(const BKeyEvent&)">keyPressEvent</a>(const BKeyEvent& keyEvent);</td></tr>
				<tr><td align="right">virtual bool </td><td><a href="#keyReleaseEvent(const BKeyEvent&)">keyReleaseEvent</a>(const BKeyEvent& keyEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mouseEnterEvent(const BMouseEvent&)">mouseEnterEvent</a>(const BMouseEvent& mouseEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mouseLeaveEvent(const BMouseEvent&)">mouseLeaveEvent</a>(const BMouseEvent& mouseEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mousePressEvent(const BMouseEvent&)">mousePressEvent</a>(const BMouseEvent& mouseEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mouseReleaseEvent(const BMouseEvent&)">mouseReleaseEvent</a>(const BMouseEvent& mouseEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mouseMoveEvent(const BMouseEvent&)">mouseMoveEvent</a>(const BMouseEvent& mouseEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mouseDoubleClickEvent(const BMouseEvent&)">mouseDoubleClickEvent</a>(const BMouseEvent& mouseEvent);</td></tr>
			</table>
			<div id="desc">
				<h2>详细介绍：</h2><p>BLineEdit是单行文本编辑框，所以按下回车键时会结束编辑。</p><p>文本显示可以使用格式化工具进行修饰。</p><p>文本内容前面可加入前缀文本，后面可以加入后缀文本。前缀和后缀可以设置对齐方式。</p><p>支持复制（Ctrl+C）、剪切（Ctrl+X）、粘贴（Ctrl+V）等快捷操作。</p>
			</div>
			<h2 id="docs">成员文档：</h2>
			<div id="BLineEdit(BWidget*)">
				<h3>BLineEdit(BWidget* parent = 0);</h3><p>构造一个单行文本框，parent指定其父控件。</p>
			</div>
			<div id="BLineEdit(const BString&,BWidget*)">
				<h3>BLineEdit(const BString&amp; text, BWidget* parent = 0);</h3><p>构造一个单行文本框，text指定文本，parent指定其父控件。</p>
			</div>
			<div id="~BLineEdit()">
				<h3>~BLineEdit();</h3><p>析构一个单行文本框。</p>
			</div>
			<div id="setAlign(Align)">
				<h3>bool setAlign(Align align);</h3><p>设置文本的对齐方式。</p>
			</div>
			<div id="align()">
				<h3>Align align() const;</h3><p>获得文本的对齐方式。</p>
			</div>
			<div id="setText(const BString&)">
				<h3>bool setText(const BString&amp; text);</h3><p>设置内容文本。</p>
			</div>
			<div id="text()">
				<h3>const BString&amp; text() const;</h3><p>获得内容文本。</p>
			</div>
			<div id="setTextFormat(BTextFormat*)">
				<h3>bool setTextFormat(BTextFormat* textFormat);</h3><p>设置文本格式化对象。</p>
			</div>
			<div id="textFormat()">
				<h3>const BTextFormat* textFormat() const;</h3><p>获得文本格式化常量对象。</p>
			</div>
			<div id="textFormat()">
				<h3>BTextFormat* textFormat();</h3><p>获得文本格式化常量对象。</p>
			</div>
			<div id="setReadOnly(bool)">
				<h3>bool setReadOnly(bool readOnly);</h3><p>设置只读模式。</p>
			</div>
			<div id="readOnly()">
				<h3>bool readOnly() const;</h3><p>获得只读模式。</p>
			</div>
			<div id="setPrefix(const BString&)">
				<h3>bool setPrefix(const BString&amp; prefix);</h3><p>设置前缀文本。</p>
			</div>
			<div id="prefix()">
				<h3>const BString&amp; prefix() const;</h3><p>获得前缀文本。</p>
			</div>
			<div id="setPrefixAlign(Align)">
				<h3>bool setPrefixAlign(Align prefixAlign);</h3><p>设置前缀文本的对齐方式。</p>
			</div>
			<div id="prefixAlign()">
				<h3>Align prefixAlign() const;</h3><p>获得前缀文本的对齐方式。</p>
			</div>
			<div id="setSuffix(const BString&)">
				<h3>bool setSuffix(const BString&amp; suffix);</h3><p>设置后缀文本。</p>
			</div>
			<div id="suffix()">
				<h3>const BString&amp; suffix() const;</h3><p>获得后缀文本。</p>
			</div>
			<div id="setSuffixAlign(Align)">
				<h3>bool setSuffixAlign(Align suffixAlign);</h3><p>设置后缀文本的对齐方式。</p>
			</div>
			<div id="suffixAlign()">
				<h3>Align suffixAlign() const;</h3><p>获得后缀文本的对齐方式。</p>
			</div>
			<div id="BWidget::query;()">
				<h3>using BWidget::query;</h3>
			</div>
			<div id="query(const BString&, BValue&)">
				<h3>virtual bool query(const BString&amp; text, BValue&amp; value) const;</h3><p>查询表：</p><table>
					<tr><td>text</td><td>获得此文本框的内容文本，值为：BString text。</td></tr>
					<tr><td>text-size</td><td>获得文本显示的尺寸，值为：BSize textSize。</td></tr>
					<tr><td>text-rect</td><td>获得文本显示的矩形区域，值为：BRect textRect。</td></tr></table>
			</div>
			<div id="sizeHint()">
				<h3>virtual BSize sizeHint() const;</h3><p>预留10个字符位置给文本编辑区，并可显示前缀和后缀。</p>
			</div>
			<div id="updateEvent(const BEvent&)">
				<h3>virtual void updateEvent(const BEvent&amp; event);</h3><p>刷新输入光标闪烁显示。</p>
			</div>
			<div id="resizeEvent(const BEvent&)">
				<h3>virtual void resizeEvent(const BEvent&amp; event);</h3><p>重新调整绘制布局。</p>
			</div>
			<div id="styleEvent(const BEvent&)">
				<h3>virtual void styleEvent(const BEvent&amp; event);</h3><p>样式取值：</p><table>
					<tr><td>Value_Text</td><td>取值为内容文本，值为：BString text。</td></tr>
					<tr><td>Value_Align</td><td>取值为内容文本的对齐方式，值为：Align align。</td></tr></table><p>prefix子样式取值：</p><table>
					<tr><td>Value_Text</td><td>取值为前缀文本，值为：BString prefix。</td></tr>
					<tr><td>Value_Align</td><td>取值为前缀文本的对齐方式，值为：Align prefixAlign。</td></tr></table><p>suffix子样式取值：</p><table>
					<tr><td>Value_Text</td><td>取值为后缀文本，值为：BString suffix。</td></tr>
					<tr><td>Value_Align</td><td>取值为后缀文本的对齐方式，值为：Align suffixAlign。</td></tr></table>
			</div>
			<div id="freshEvent(const BEvent&)">
				<h3>virtual void freshEvent(const BEvent&amp; event);</h3><p>更新文本绘制，以及输入光标位置。</p>
			</div>
			<div id="paintEvent(const BEvent&)">
				<h3>virtual void paintEvent(const BEvent&amp; event);</h3><p>绘制内容文本，绘制前缀文本，绘制后缀文本，绘制光标。</p>
			</div>
			<div id="focusEvent(const BEvent&)">
				<h3>virtual void focusEvent(const BEvent&amp; event);</h3><p>获得焦点时会选中所有内容文本。失去焦点时若文本被编辑过则结束编辑并发出信号：Signal_EditFinished。</p>
			</div>
			<div id="inputEvent(const BEvent&)">
				<h3>virtual void inputEvent(const BEvent&amp; event);</h3><p>输入字符时发出信号：Signal_TextEdited, Signal_TextChanged。</p>
			</div>
			<div id="keyPressEvent(const BKeyEvent&)">
				<h3>virtual bool keyPressEvent(const BKeyEvent&amp; keyEvent);</h3><p>处理各种快捷键组合，换行符处理。</p>
			</div>
			<div id="keyReleaseEvent(const BKeyEvent&)">
				<h3>virtual bool keyReleaseEvent(const BKeyEvent&amp; keyEvent);</h3>
			</div>
			<div id="mouseEnterEvent(const BMouseEvent&)">
				<h3>virtual void mouseEnterEvent(const BMouseEvent&amp; mouseEvent);</h3>
			</div>
			<div id="mouseLeaveEvent(const BMouseEvent&)">
				<h3>virtual void mouseLeaveEvent(const BMouseEvent&amp; mouseEvent);</h3>
			</div>
			<div id="mousePressEvent(const BMouseEvent&)">
				<h3>virtual void mousePressEvent(const BMouseEvent&amp; mouseEvent);</h3>
			</div>
			<div id="mouseReleaseEvent(const BMouseEvent&)">
				<h3>virtual void mouseReleaseEvent(const BMouseEvent&amp; mouseEvent);</h3>
			</div>
			<div id="mouseMoveEvent(const BMouseEvent&)">
				<h3>virtual void mouseMoveEvent(const BMouseEvent&amp; mouseEvent);</h3><p>处理鼠标拖动选取内容文本。</p>
			</div>
			<div id="mouseDoubleClickEvent(const BMouseEvent&)">
				<h3>virtual void mouseDoubleClickEvent(const BMouseEvent&amp; mouseEvent);</h3><p>选择当前光标位置的单词。</p>
			</div>
		</div>
	</body>
</html>